![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@foxglove/message-definition
Advanced tools
Defines common types for message definition schemas (ROS .msg, Protobuf, FlatBuffers, IDL, PX4 ULog, JSON Schema, etc)
Defines common TypeScript types for message definition schemas (ROS .msg, Protobuf, FlatBuffers, IDL, PX4 ULog, JSON Schema, etc).
Several interface definition languages exist today for describing the structure of messages. These languages are often used to generate code for serialization and deserialization of messages. This package defines a common representation in TypeScript for interface definitions, sometimes referred to as message definitions, so they can be reasoned about in a generic way. A concrete example of this is in Foxglove Studio, which supports many different message serializations but provides common functionality across all of them such as Message Path Syntax and structured message display.
Here is a an example of a ROS 2 message definition (.msg
file) and its corresponding TypeScript representation:
UserAccount.msg
:
string username
Account account
============
MSG: custom_type/Account
string name
uint16 id
UserAccount.ts
:
[
{
definitions: [
{ type: "string", name: "username" },
{ type: "custom_type/Account", name: "account", isComplex: true },
],
},
{
name: "custom_type/Account",
definitions: [
{ type: "string", name: "name" },
{ type: "uint16", name: "id" },
],
},
];
Note that this package only provides type definitions, not any functionality for parsing or generating message definitions. For that, see foxglove/rosmsg or other packages that depend on this one.
@foxglove/message-definition is licensed under MIT License.
yarn version --[major|minor|patch]
to bump versiongit push && git push --tags
to push new tagJoin our Slack channel to ask questions, share feedback, and stay up to date on what our team is working on.
FAQs
Defines common types for message definition schemas (ROS .msg, Protobuf, FlatBuffers, IDL, PX4 ULog, JSON Schema, etc)
The npm package @foxglove/message-definition receives a total of 8,231 weekly downloads. As such, @foxglove/message-definition popularity was classified as popular.
We found that @foxglove/message-definition demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.